package org.hamster.common.aggrid.model;

import java.util.List;

/**
 * Model representing filter parameters from ag-Grid
 */
public class FilterModel {
    private String filterType;
    private String type;
    private Object filter;
    private Object filterTo;
    
    // For text filters
    private String operator;
    
    // For composite filters (AND/OR conditions)
    private List<FilterModel> conditions;
    private String operatorComposite; // "AND" or "OR" for combining conditions

    public FilterModel() {
    }

    public String getFilterType() {
        return filterType;
    }

    public void setFilterType(String filterType) {
        this.filterType = filterType;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Object getFilter() {
        return filter;
    }

    public void setFilter(Object filter) {
        this.filter = filter;
    }

    public Object getFilterTo() {
        return filterTo;
    }

    public void setFilterTo(Object filterTo) {
        this.filterTo = filterTo;
    }

    public String getOperator() {
        return operator;
    }

    public void setOperator(String operator) {
        this.operator = operator;
    }

    public List<FilterModel> getConditions() {
        return conditions;
    }

    public void setConditions(List<FilterModel> conditions) {
        this.conditions = conditions;
    }

    public String getOperatorComposite() {
        return operatorComposite;
    }

    public void setOperatorComposite(String operatorComposite) {
        this.operatorComposite = operatorComposite;
    }

    @Override
    public String toString() {
        return "FilterModel{" +
                "filterType='" + filterType + '\'' +
                ", type='" + type + '\'' +
                ", filter=" + filter +
                ", filterTo=" + filterTo +
                ", operator='" + operator + '\'' +
                ", conditions=" + conditions +
                ", operatorComposite='" + operatorComposite + '\'' +
                '}';
    }
}